perm filename DVIIMP.DIF[MF,ALS] blob sn#785690 filedate 1985-02-13 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00006 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 3,3
C00006 00003	  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14
C00009 00004	  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14
C00012 00005	  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14
C00015 00006	  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14
C00020 ENDMK
C⊗;
  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 3,3

**** File 1) DVIIMP.WEB[MF,ALS]/3P/100L
1)	@!m_store_size=110000; {second index limit for mask store}
1)	@!max_char_no=127; {largest allowed char number}
**** File 2) DVIIMP.WEB[1,DRF]/3P/100L
2)	@!m_store_size=77000; {second index limit for mask store}
2)	@!max_char_no=127; {largest allowed char number}
***************


**** File 1) DVIIMP.WEB[MF,ALS]/9P/23L
1)	We also follow the \.{DNItype} example of storing the glyph widths
1)	(measured in \.{DVI} units) in a |width| array that is indexed by values
**** File 2) DVIIMP.WEB[1,DRF]/9P/23L
2)	We also follow the \.{DVItype} example of storing the glyph widths
2)	(measured in \.{DVI} units) in a |width| array that is indexed by values
***************


**** File 1) DVIIMP.WEB[MF,ALS]/9P/33L
1)	pixels) since it will be organixed in an identical way to that used with
1)	the |width| table.
**** File 2) DVIIMP.WEB[1,DRF]/9P/33L
2)	pixels) since it will be organized in an identical way to that used with
2)	the |width| table.
***************


**** File 1) DVIIMP.WEB[MF,ALS]/9P/57L
1)	@d f_i_s==nf mod m_m_num
1)	   {first or font index on stowing, to index s_i and as first index to m_store}
1)	@d big_f_i_s==f_i_s*m_store_size {used in computing |glyph_ptr|}
1)	@d f_i_r==cur_font mod m_m_num
1)	   {first or font index on reading, to index s_i and as first index to m_store}
1)	@d big_f_i_r==f_i_r*m_store_size {used in computing |glyph_ptr|}
1)	@d stow(#)==begin m_store[f_i_s,s_i[f_i_s]]←#; incr(s_i[f_i_s]); end;
1)	@<Glob...@>=
**** File 2) DVIIMP.WEB[1,DRF]/9P/57L
2)	@d f_i_s==(nf mod m_m_num)
2)	   {first or font index on stowing, to index s_i and as first index to m_store}
2)	@d big_f_i_s==(f_i_s*m_store_size) {used in computing |glyph_ptr|}
2)	@d f_i_r==(cur_font mod m_m_num)
2)	   {first or font index on reading, to index s_i and as first index to m_store}
2)	@d big_f_i_r==(f_i_r*m_store_size) {used in computing |glyph_ptr|}
2)	@d stow(#)==begin m_store[f_i_s,s_i[f_i_s]]←#; incr(s_i[f_i_s]); end
2)	@<Glob...@>=
***************


  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14

**** File 1) DVIIMP.WEB[MF,ALS]/14P/15L
1)	assign for for the horizontal and vertical locations (including the necessary
1)	|h_offset| and |v_offset| which on a 300 pixel per inch \.{IMAGEN} is 300
1)	to allow for the location of the page origin down one inch and
1)	over one inch from the edge of the paper).
1)	The stack of $(h,v,w,x,y,z)$ values is represented by eight arrays
**** File 2) DVIIMP.WEB[1,DRF]/14P/15L
2)	assign for for the horizontal and vertical locations.
2)	The stack of $(h,v,w,x,y,z)$ values is represented by eight arrays
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/25L
1)	@!h_offset,@!v_offset:integer; {Values to define the starting position on a page}
1)	@!hstack,@!vstack,@!wstack,@!xstack,@!ystack,@!zstack:
**** File 2) DVIIMP.WEB[1,DRF]/14P/22L
2)	@!hstack,@!vstack,@!wstack,@!xstack,@!ystack,@!zstack:
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/31L
1)	@ @<Set init...@>=
1)	h_offset←300;
1)	v_offset←300;
1)	@ Three characteristics of the pages (their |max_v|, |max_h|, and
**** File 2) DVIIMP.WEB[1,DRF]/14P/27L
2)	@ Three characteristics of the pages (their |max_v|, |max_h|, and
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/130L
1)	@p @t\4@>@<Declare the function called |special_cases|@>@;
**** File 2) DVIIMP.WEB[1,DRF]/14P/121L
2)	@d infinity==@'17777777777 {$\infty$ (approximately)}
2)	@p @t\4@>@<Declare the function called |special_cases|@>@;
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/139L
1)	s←0; h←0; v←0; w←0; x←0; y←0; z←0; hh←0; vv←0;
1)		{initialize the state variables}
**** File 2) DVIIMP.WEB[1,DRF]/14P/132L
2)	s←0; h←round(300/conv); v←h; w←0; x←0; y←0; z←0;
2)	hh←pixel_round(h); vv←pixel_round(v);
2)	hhi←infinity; vvi←infinity;
2)		{initialize the state variables}
***************

  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14


**** File 1) DVIIMP.WEB[MF,ALS]/14P/299L
1)	        hhi←hh+h_offset; {assuming that it is safe to reset}
1)	        im_byte(set_abs_h); im_halfword(hhi);
1)	        if show_flag then print_ln('hhi reset to ',hhi:1);
1)		minor(#,' ',p:1); q←p; goto move_right
**** File 2) DVIIMP.WEB[1,DRF]/14P/294L
2)		minor(#,' ',p:1); q←p; goto move_right
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/319L
1)		vvi←vv+v_offset;
1)	        im_byte(set_abs_v); im_halfword(vvi);
1)	        if show_flag then print_ln('vvi reset to ',vvi:1);
1)		major(#,' ',p:1); goto move_down
**** File 2) DVIIMP.WEB[1,DRF]/14P/311L
2)		major(#,' ',p:1); goto move_down
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/366L
1)	@ @<Finish a command that either sets or puts a character...@>=
**** File 2) DVIIMP.WEB[1,DRF]/14P/355L
2)	@ @<Resynchronize@>=
2)	if hhi≠hh then begin
2)		hhi←hh; im_byte(set_abs_h); im_halfword(hhi);
2)		end;
2)	if vvi≠vv then begin
2)		vvi←vv; im_byte(set_abs_v); im_halfword(vvi);
2)		end;
2)	@ @<Finish a command that either sets or puts a character...@>=
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/381L
1)	else
1)	 begin
1)	g←glyph_ptr[data_base[cur_font]+p];
1)	if show_flag then
1)	print(' (',f_i_r:1,',',glyph_ptr[data_base[cur_font]+p]-big_f_i_r:1,')');
1)	if g>0 then do_im_bgly(p);
1)	if hhi≠hh+h_offset then begin
1)	hhi←hh+h_offset; im_byte(set_abs_h); im_halfword(hhi);
1)	end;
1)	if vvi≠vv+v_offset then begin
1)	vvi←vv+v_offset; im_byte(set_abs_v); im_halfword(vvi);
1)	end;
  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14

1)	im_byte(p); {this sends glyph p of current family}
1)	hhi←hhi+pixel_width[data_base[cur_font]+p];
1)	 end;
1)	if o≥put1 then goto done;
**** File 2) DVIIMP.WEB[1,DRF]/14P/378L
2)	else begin
2)		g←glyph_ptr[data_base[cur_font]+p];
2)		if show_flag then
2)	print(' (',f_i_r:1,',',glyph_ptr[data_base[cur_font]+p]-big_f_i_r:1,')');
2)		if g>0 then do_im_bgly(p);
2)		@<Resynchronize@>;
2)		im_byte(p); {this sends glyph p of current family}
2)		hhi←hhi+pixel_width[data_base[cur_font]+p];
2)		end;
2)	if o≥put1 then goto done;
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/409L
1)	if hhi≠hh+h_offset then begin
1)	hhi←hh+h_offset; im_byte(set_abs_h); im_halfword(hhi);
1)	end;
1)	if vvi≠vv+v_offset then begin
1)	vvi←vv+v_offset; im_byte(set_abs_v); im_halfword(vvi);
1)	end;
1)	im_byte(im_brule); im_halfword(rule_pixels(q)); im_halfword(rule_pixels(p));
1)	im_halfword(rule_pixels(-p));
1)	if o=put_rule then goto done;
**** File 2) DVIIMP.WEB[1,DRF]/14P/400L
2)	@<Resynchronize@>;
2)	im_byte(im_brule); im_halfword(rule_pixels(q)); im_halfword(rule_pixels(p));
2)	im_halfword(rule_pixels(-p));
2)	{|hhi←hhi;| there seems to be no escapement for rules}
2)	if show_flag then print_ln('hhi reset for rule to ',hhi:1);
2)	if o=put_rule then goto done;
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/420L
1)	hhi←hh; im_byte(set_abs_h); im_halfword(hhi);
1)	if show_flag then print_ln('hhi reset for rule to ',hhi:1);
1)	 goto move_right
1)	@ A sequence of consecutive rules, or consecutive characters in a fixed-width
**** File 2) DVIIMP.WEB[1,DRF]/14P/408L
2)	goto move_right
2)	@ A sequence of consecutive rules, or consecutive characters in a fixed-width
***************

  1) DVIIMP.WEB[MF,ALS] and 2) DVIIMP.WEB[1,DRF]	2-13-85 12:55	pages 14,14


**** File 1) DVIIMP.WEB[MF,ALS]/14P/433L
1)	@d infinity==@'17777777777 {$\infty$ (approximately)}
1)	@d max_drift=2 {we insist that abs|(hh-pixel_round(h))≤max_drift|}
**** File 2) DVIIMP.WEB[1,DRF]/14P/419L
2)	@d max_drift=2 {we insist that abs|(hh-pixel_round(h))≤max_drift|}
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/453L
1)		hhi←hh+h_offset; im_byte(set_abs_h); im_halfword(hhi);
1)		end;
**** File 2) DVIIMP.WEB[1,DRF]/14P/438L
2)		hhi←hh; im_byte(set_abs_h); im_halfword(hhi);
2)		end;
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/489L
1)		vvi←vv+v_offset; im_byte(set_abs_v); im_halfword(vvi);
1)		end;
**** File 2) DVIIMP.WEB[1,DRF]/14P/474L
2)		vvi←vv; im_byte(set_abs_v); im_halfword(vvi);
2)		end;
***************


**** File 1) DVIIMP.WEB[MF,ALS]/14P/520L
1)	im_byte(set_family); im_byte(cur_font);
**** File 2) DVIIMP.WEB[1,DRF]/14P/505L
2)	if cur_font=nf then error('bad font?');
2)	im_byte(set_family); im_byte(cur_font);
***************


**** File 1) DVIIMP.WEB[MF,ALS]/18P/9L
1)	im_byte(im_set_bol); im_halfword(300);
1)	im_byte(set_abs_h); im_halfword(300);
1)	im_byte(set_abs_v); im_halfword(300);
1)	if out_mode=the_works then {|random_reading=true|}
**** File 2) DVIIMP.WEB[1,DRF]/18P/9L
2)	if out_mode=the_works then {|random_reading=true|}
***************


**** File 1) DVIIMP.WEB[MF,ALS]/18P/36L
1)	@ A \.{DVI}-reading program that reads the postamble first need not look at the
**** File 2) DVIIMP.WEB[1,DRF]/18P/32L
2)	@!id_len: 0..255;
2)	@!id: packed array[0..255] of 0..255;
2)	@ A \.{DVI}-reading program that reads the postamble first need not look at the
***************


**** File 1) DVIIMP.WEB[MF,ALS]/18P/50L
1)	p←get_byte; {fetch the length of the introductory comment}
1)	if show_flag then
1)	begin
1)	print('''');
1)	while p>0 do
1)		begin decr(p); print(xchr[get_byte]);
1)		end;
1)	print_ln('''')
1)	end;
1)	@ The conversion factor |conv| is figured as follows: There are exactly
**** File 2) DVIIMP.WEB[1,DRF]/18P/49L
2)	id_len←get_byte; {fetch the length of the introductory comment}
2)	p←0;
2)	while p<id_len do
2)		begin incr(p); id[p]←get_byte;
2)		end;
2)	@ The conversion factor |conv| is figured as follows: There are exactly
***************